{% extends "base.html" %}
{% block content %}
{% if msg %}
<div class="alert alert-success alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
{{msg}}
</div>
{% endif %}

<form action="/setting/save" method="POST" role="form">
    <div class="col-sm-12">
        <span class="legend">推送</span>
    </div>
    <div class="col-sm-10 col-sm-offset-1">
        <div class="form-group">
            <label for="exampleInputEmail1">Kindle地址</label>
            <input name="kindle_email" type="email" class="form-control" id="exampleInputEmail1" placeholder='请输入email地址' value="{{user.extra.kindle_email}}">
        </div>
    </div>

    {% if user.admin %}
    <p>&nbsp;</p>
    <div class="col-sm-12">
        <span class="legend">在线管理</span>
    </div>
    <div class="col-sm-10 col-sm-offset-1">
        <div class="checkbox">
            <label>
                <input checked=checked name="allow_admin" type="checkbox">
                允许在线书籍管理
            </label>
        </div>
        <div class="checkbox">
            <label>
                <input checked=checked name="allow_delete" type="checkbox">
                允许删除书籍
            </label>
        </div>
    </div>
    {% endif %}
    <div class="col-sm-4 col-sm-offset-4">
        <p>&nbsp;</p>
        <button type="submit" class="btn-block btn btn-default">保存设置</button>
    </div>
</form>

{% endblock %}

{% block sidebar %}
{% include "sidebar/basic.html" %}
{% endblock %}
